package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IGuessingActivityModel;
import com.wgts.wgts.mvp.model.imp.GuessingActivityModel;
import com.wgts.wgts.mvp.presenter.IGuessingActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.GuessingActivityPresenter;
import com.wgts.wgts.mvp.view.IGuessingActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/10/1317:20
 *
 */
@Module
public class GuessingActivityModule {
    private IGuessingActivityView view;

    public GuessingActivityModule(IGuessingActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IGuessingActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IGuessingActivityModel provideModel(NetService netService){
        return new GuessingActivityModel(netService);
    }

    @ActivityScope
    @Provides
    public IGuessingActivityPresenter providePresenter(IGuessingActivityView view, IGuessingActivityModel model){
        return new GuessingActivityPresenter(view, model);
    }

}
